<?php

namespace App\Http\Presenters;

use Laracasts\Presenter\Presenter;


class RecordPresenter extends Presenter
{

    public function showamount()
    {
        $value = '';
        switch ($this->flag) {
            case 1:
                $value = '<span class="green bigger-120"><b>+' . $this->amount . '</b></span><span class="smaller-80"> 积分</span>';
                break;
            case 0:
                $value = '<span class="red bigger-120"><b>-' . $this->amount . '</b></span><span class="smaller-80"> 积分</span>';
                break;

            default:
                break;
        }
        return $value;
    }


    public function showtype()
    {
        $value = '';
        switch ($this->type) {
            case 1:
                $value = '<span class="info">活动签到</span>';
                break;
            case 2:
                $value = '<span class="pink">志愿者</span>';
                break;
            case 3:
                $value = '<span class="green">积分奖励</span>';
                break;
            case 4:
                $value = '<span class="green">活动奖励</span>';
                break;
            case 9:
                $value = '<span class="red">礼品兑换</span>';
                break;
            default:
                break;
        }
        return $value;
    }


}
